﻿@model UpdateOrderItemModel

<modal id="update-orderitem-dialog" sm-render-at-page-end="true">
    <modal-header sm-title="@Model.Caption"></modal-header>
    <modal-body>
        <form id="update-orderitem-form" asp-antiforgery="true" method="post" action="@(Model.PostUrl ?? "#")">
            <input type="hidden" name="Id" value="@Model.Id" />
            <input type="hidden" name="NewQuantity" />
            <input type="hidden" name="NewUnitPriceInclTax" />
            <input type="hidden" name="NewUnitPriceExclTax" />
            <input type="hidden" name="NewTaxRate" />
            <input type="hidden" name="NewDiscountInclTax" />
            <input type="hidden" name="NewDiscountExclTax" />
            <input type="hidden" name="NewPriceInclTax" />
            <input type="hidden" name="NewPriceExclTax" />

            <div class="adminContent">
                <div class="adminRow">
                    <div class="adminTitle w-50">
                        <smart-label asp-for="AdjustInventory" />
                    </div>
                    <div class="adminData">
                        <input asp-for="AdjustInventory" />
                    </div>
                </div>
                <div sm-if="Model.ShowUpdateRewardPoints" class="adminRow">
                    <div class="adminTitle">
                        <smart-label asp-for="UpdateRewardPoints" />
                    </div>
                    <div class="adminData">
                        <input asp-for="UpdateRewardPoints" />
                    </div>
                </div>
                <div sm-if="Model.ShowUpdateTotals" class="adminRow">
                    <div class="adminTitle">
                        <smart-label asp-for="UpdateTotals" />
                    </div>
                    <div class="adminData">
                        <input asp-for="UpdateTotals" />
                    </div>
                </div>
            </div>
        </form>
    </modal-body>
    <modal-footer>
        <button class="btn btn-secondary btn-flat" data-dismiss="modal">
            <span>@T("Common.Cancel")</span>
        </button>
        <button id="btn-update-orderitem" class="btn btn-primary" data-dismiss="modal" onclick="$('#update-orderitem-form').submit();">
            <span>@T("Common.OK")</span>
        </button>
    </modal-footer>
</modal>
